package Main;

import plugin.PluginLoader;
import plugin.SystemClassLoader;

/**
 * Symply holder of system parameters
 * @author lida
 */
public class Parameters {
    //general system settings:

    public static String[] AutostartLibs; // List of autostart libs
    public static String LocalIP;  //local server IP adress
    public static int LocalPort;   //local server port
    public static String Language; //current system language
    public static String MainLogPath; //path to folder where save logs
    public static boolean MainLogCreated; //true if created main log
    public static byte DeleteLogFileOfTask;
    public static int QuitTime;
    public static boolean exit;
    public static boolean ExitTimerIsWorking;
    public static int FindTaskPause;
    //System time
    public static String IDDSStartTime;
    public static String CurrentSystemTime;
    //task parameters:
    public static String TaskFolder;
    public static String FileTaskExtension;
    public static byte MoveDoneTask;
    public static String MoveDoneTaskTo;
    public static String MoveDoneTaskExtension;
    public static byte MoveFailedTask;
    public static String MoveFailedTaskTo;
    public static String MoveFailedTaskExtension;
    public static int OldTaskPriorirty;
    public static int MaxTaskNumber;
    public static byte DeleteTaskWhenDone;
    public static byte DeleteTaskWhenFail;
    public static int DefaultTaskPriority;
    public static int DefaultSubtaskPriority; //default subtask priority for subtasks than didn't contain priority field
    public static int TotalTasks;
    public static int TasksDone;
    public static String[] AdrOfDoneTasks;
    public static String[] taskAssignTime;
    public static String[] TaskName;
    public static int CurrentTaskNumber;
    public static boolean TaskFailed;
    //Plugin parameters:
    public static String[] AutoloadPlugins; // names of plugins to load at startup
    public static String[] LoadedPluginNames; // names of plugins that been loaded
    public static PluginLoader[] LoadedPlugins;     // loaded plugin's
    public static String PluginDirectory; //plugin folder path
    public static String CurrentTaskPluginName;  //current plugin name
    public static String[] Plugin_parameter_name;
    public static String[] Plugin_group_name;
    public static String[][] Plugin_group_parameter_name;
    //PRIVATE TASK PARAMETERS:
    public static String[][] Task_String_parameter; // String[type of parameter][number] parameters
    public static String[][][][] Task_Group_String_parameter; // String [group number][number of group][type of parameter][number] parameters of group
    //if OS is Windows
    public static boolean LounchedFromWindows;
    //GUI parameters
    public static int GUI_Console_max_lines;
    public static boolean GUIAvailable;  //True if GUI runs
    //GUI Main Frame
    public static String GUI_MainTitle;
    public static String GUI_TaskList_number;
    public static String GUI_TaskList_name;
    public static String GUI_TaskList_starttime;
    public static String GUI_TaskList_done;
    public static String GUI_TaskTabTitle;
    public static String GUI_ConsoleTabTitle;
    public static String GUI_MenuFile;
    public static String GUI_MenuFile_Close;
    public static String GUI_MenuFile_Exit;
    public static String GUI_MenuEdit;
    public static String GUI_MenuEdit_TaskCreate;
    public static String GUI_MenuEdit_Parameters;
    public static String GUI_MenuInfo;
    public static String GUI_MenuInfo_About;
    public static String GUI_MenuInfo_Help;
    public static String GUI_ButtonInput;
    //Gui TaskCreateFrame
    public static String GUI_TaskCreateFrame_Title;
    public static String GUI_TaskCreateFrame_TaskNameLabel;
    public static String GUI_TaskCreateFrame_PluginLabel;
    public static String GUI_TaskCreateFrame_ParameterLabel;
    public static String GUI_TaskCreateFrame_ParameterValueLabel;
    public static String GUI_TaskCreateFrame_GroupLabel;
    public static String GUI_TaskCreateFrame_AddParameterValueButton;
    public static String GUI_TaskCreateFrame_AddGroupButton;
    public static String GUI_TaskCreateFrame_GroupParameterLabel;
    public static String GUI_TaskCreateFrame_GroupParameterValueLabel;
    public static String GUI_TaskCreateFrame_AddGroupParameterButton;
    public static String GUI_TaskCreateFrame_TaskSaveButton;
    public static String GUI_TaskCreateFrame_TaskCheckButton;
    public static String GUI_TaskCreateFrame_TaskChangeButton;
    public static String GUI_TaskCreateFrame_ChangeSubtaskButton;
    public static String GUI_TaskCreateFrame_AddSubtaskButton;
    public static String GUI_TaskCreateFrame_RemoveSubtaskButton;
    public static String GUI_TaskCreateFrame_ChangeValueButton;
    public static String GUI_TaskCreateFrame_TaskStartUpLabel;
    public static String GUI_TaskCreateFrame_TaskPriorityLabel;
    public static String GUI_TaskCreateFrame_SubtaskPriorityLabel;
    public static String GUI_TaskCreateFrame_SubtaskTable;
    public static String GUI_TaskCreateFrame_SubtaskPriorityTable;
    public static String GUI_TaskCreateFrame_PluginsComboBox_ChoosePlugin;
    public static String GUI_TaskCreateFrame_ParametersComboBox_ChooseParameter;
    public static String GUI_TaskCreateFrame_GroupComboBox_ChooseGroup;
    public static String GUI_TaskCreateFrame_GroupParametersComboBox_ChooseParameter;
    //GUI ExitFrame
    public static String GUI_ExitAskFrame_Title;
    public static String GUI_ExitAskFrame_Message;
    public static String GUI_ExitAskFrame_NoButton;
    public static String GUI_ExitAskFrame_YesButton;
    //GUI AboutFrame
    public static String GUI_AboutFrame_Title;
    public static String GUI_AboutFrame_NameLabel;
    public static String GUI_AboutFrame_DescriptionLabel;
    public static String GUI_AboutFrame_VersionLabel;
    public static String GUI_AboutFrame_AuthorLabel;
    public static String GUI_AboutFrame_HomepageLabel;

    public static SystemClassLoader[] Libs; //System Classes for libs
    public static String[] RunningLibs; //names of Running libs
    public static int LibConsoleInputReceiver; //number of lib that currently listen to console input stream
    /**
     * @param TaskName                          Names of all tasks
     * @param IDDSStartTime                     Time when system start it's working
     * @param TaskName                          Addresses of tasks
     * @param FileTaskExtension                 Extension of files with tasks
     * @param args                              The command line arguments
     * @param MainLogPath                       Path to main log
     * @param DeleteTaskWhenDone                if 1 - delete task file when done
     * @param DeleteLogFileOfTask               if 1 - delete log file of task when done
     * @param TaskFolder                        path to folder with task files
     * @param TotalTasks                        total number of tasks
     * @param TasksDone                         number of done tasks
     * @param DefaultTaskPriority               default task priority for tasks than didn't contain priority field
     * @param CurrentSystemTime                 current system time
     * @param MoveDoneTask                      if 1 - move task file when done
     * @param MoveDoneTaskTo                    folder where to move task file
     * @param MoveDoneTaskExtension             Extension of done tasks
     * @param MoveFailedTask                    if 1 - move failed task file
     * @param MoveFailedTaskTo                  folder where to move task file
     * @param MoveFailedTaskExtension           Extension of failed tasks
     * @param AdrOfDoneTasks                    Adresses of tasks that had been done
     * @param taskAssignTime                    time when task was added
     * @param CurrentTaskNumber                 Number of current task
     * @param Language                          Main system language
     * @param OldTaskPriority                   if 0 - the most older task will run first; if 1 - the task with higher priority will run
     * @param MaxTaskNumber                     Maximum tasks that can be but not more than 65536
     * @param QuitTime                          if all tasks are done, program will shutdown after specified amount of seconds ("-1" - never)
     * @param exit                              if true then program must end it's work and close
     * @param ExitTimerIsWorking                if true then timer is working
     * @param FindTaskPause                     pause in seconds between finding tasks after no task left
     * @param TaskFailed                        if true - then task was failed
     * @param LounchedFromWindows               true if program was lounched from Windows OS
     */
}
